Update XML

Use the Update XML action A tool for building the processes, logic, and direction within workflows. to update a specific data in an XML (Extensible Markup Language) source.

Before you begin:

Jump to:

Configure the Update XML action

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.

  2. Select the XML Source.
  3. Specify the XPath Query.
  4. Select an option for the Selected nodes action.
  5. Specify the Value you want to use to update the XML data.
  6. Click Save.

Update XML fields, buttons, and settings

Section

Field or button

Description

Variable types
(Unlabeled) XML Source

The XML content that you want to update. 

For example: <BookCollection><Book><Author>hello there</Author></Book></BookCollection>

Note: Although XML-reserved characters such as an ampersand ("&") or less-than sign ("<") are supported, the returned output is encoded.

Text, Decimal, Integer, Boolean, DateTime, Collection
  XPath Query

The XPath (XML Path Language) query to retrieve nodes in an XML. The XPath query can resolve to a single node, or a node list. If the result is a node list, the selected operation will be applied to each node.

For example, if you want to replace the content of the <Book></Book> node in the XML Source "<BookCollection><Book><Author>hello there</Author></Book></BookCollection>," then XPath Query is .//Book/Author.

Note: XPath has seven types of nodes: element, attribute, text, namespace, processing-instruction, comment, and document nodes. For more information about XPath or XML, see this W3Schools.com article.

Text, Decimal, Integer, Boolean, DateTime, Collection
  Selected nodes action

Specify the operation to perform on the selected node.

Select one of the following options.

  • Replace node content: Replaces all content within the XML node with the supplied value.
  • Add child node: Adds a new node from the supplied XML fragment.
  • Set node text: Sets the value of the XML node to the supplied text.
(n/a)
  Value

The value used to update the XML data.

Text, Decimal, Integer, Boolean, DateTime, Collection
Output Result

The variable used to store the result of the updated XML.

Text